|
|
|
|
|
|
|
with colors, you can allow users to change any of the application objects fonts by using a separate form to allow selection of each object type. |
|
|
|
|
|
|
|
|
The Print dialog box departs a little from the direct interaction with the visible properties that users can modify by using the Common Dialog control. This dialog box is usually displayed just before your application sends data to the printer. It allows users to choose which printer to use and also to set the options for the print process (see Figure 2.11). |
|
|
|
|
|
|
|
|
Figure 2.11.
The Print dialog box lets users set printer options
by using a consistent interface. |
|
|
|
|
|
|
|
|
As in the other dialog boxes, the Print dialog box doesn't actually send anything to your printer; you must code the correct set of Visual Basic statements to perform that task. To the previous sample font project, add a new command button control and label it Print. Then add the following code to your form: |
|
|
|
|
|
|
|
|
Private Sub cmdPrint_Click()
Dim FileCopies As Integer
Dim StartPage As Integer
Dim EndPage As Integer
dlgFileSelect.Flags = cdlPDPrintToFile Or cdlPDCollate
dlgFileSelect.ShowPrinter
If this statement is true, you would need to display the Save As
dialog box in order for the user to specify the name of the new
saved file.
If dlgFileSelect.Flags And cdlPDPrintToFile = cdlPDPrintToFile Then
MsgBox This text will be printed to a file
End If
|
|
|
|
|
|